﻿<%@ Page Title="Mapa de reservas" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MapaReservas.aspx.cs" Inherits="TCC_Hotel.Apresentacao.Reservas.MapaReservas" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../../Scripts/Mascaras.js" type="text/javascript"></script>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <asp:Label ID="lblAviso2" runat="server" Text="- Os campos com * são obrigatórios"
            ForeColor="Red"></asp:Label>
    </div>
    <p class="title-telas">
        Mapa de reservas
    </p>
    <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="0">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Timer ID="Timer1" runat="server" Interval="6000" OnTick="Timer1_Tick">
            </asp:Timer>
            <asp:Label ID="lblNumeroHospedes" runat="server" Text="Número de hóspedes:"></asp:Label><br />
            <asp:DropDownList ID="ddlNumeroHospedes" runat="server" AutoPostBack="True" Height="16px"
                OnSelectedIndexChanged="ddlNumeroHospedes_SelectedIndexChanged">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:Label ID="lblFiltro" runat="server" Text="Filtro por período:"></asp:Label>
            <br />
            <asp:TextBox onkeyup="formataData(this,event);" ID="txtPeriodoInicial" runat="server"
                Width="130px" MaxLength="10"></asp:TextBox>
            <asp:CalendarExtender ID="txtPeriodoInicial_CalendarExtender" runat="server" 
                TargetControlID="txtPeriodoInicial" Format="dd/MM/yyyy">
            </asp:CalendarExtender>
            até
            <asp:TextBox onkeyup="formataData(this,event);" ID="txtPeriodoFinal" runat="server"
                Width="130px" MaxLength="10"></asp:TextBox>
            <asp:CalendarExtender ID="txtPeriodoFinal_CalendarExtender" runat="server" 
                TargetControlID="txtPeriodoFinal" Format="dd/MM/yyyy">
            </asp:CalendarExtender>
            <asp:Button ID="btnFiltrar" runat="server" Text="Filtrar" 
                onclick="btnFiltrar_Click"/>
            <asp:Button ID="btnLimpar" runat="server" Text="Limpar" 
                onclick="btnLimpar_Click" />
             <asp:Label ID="lblErroFiltro" runat="server" Visible="False" ForeColor="Red"></asp:Label>
                       
            <br />
            <asp:Label ID="lblApartamento" runat="server" Text="Apartamento:"></asp:Label>
            <asp:Label ID="lblValidacaoApartamento" runat="server" Text="*" ForeColor="Red"></asp:Label><br>
            <asp:DropDownList ID="ddlApartamentos" runat="server" OnSelectedIndexChanged="ddlApartamentos_SelectedIndexChanged"
                AutoPostBack="True">
            </asp:DropDownList>
            <asp:Calendar ID="cldReservas" runat="server" Height="400px" Width="100%" OnSelectionChanged="cldReservas_SelectionChanged"
                BackColor="White" BorderColor="Black" BorderStyle="Solid" CellSpacing="1" Font-Names="Verdana"
                Font-Size="9pt" ForeColor="Black" OnDayRender="cldReservas_DayRender">
                <DayHeaderStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" Height="8pt" />
                <DayStyle BackColor="#CCCCCC" />
                <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="White" />
                <OtherMonthDayStyle ForeColor="#999999" />
                <SelectedDayStyle BackColor="#FFFF66" ForeColor="White" />
                <TitleStyle BackColor="#4B6C9E" BorderStyle="Solid" Font-Bold="True" Font-Size="12pt"
                    ForeColor="White" Height="12pt" />
                <TodayDayStyle BackColor="#999999" ForeColor="White" />
            </asp:Calendar>
            <div>
                Legenda:
                <br />
                Célula verde: Data disponível para reserva.
                <br />
                Célula vermelha: Data reservada para um hóspede particular.<br />
                Célula laranja: Data reservada para empresa.<br />
                Célula azul: Hóspede está no apartamento.
            </div>
            <br />
            <asp:Label ID="lblErro" runat="server" Visible="False" ForeColor="Red"></asp:Label>
            <fieldset>
                <legend id="legend3" runat="server">
                    <asp:Label ID="Label3" runat="server" Text="Realizar Reserva"></asp:Label>
                </legend>
                <table id="Table1" runat="server">
                    <tr>
                        <td>
                            <asp:Label ID="lblInicio" runat="server" Text="Data inicial:"></asp:Label>
                            <asp:Label ID="lblValidacaoDataInicial" runat="server" Text="*" ForeColor="Red"></asp:Label><br>
                            <asp:TextBox ReadOnly="true" ID="txtDataInicial" runat="server" MaxLength="10"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblFinal" runat="server" Text="Data final:"></asp:Label>
                            <asp:Label ID="lblValidacaoDataFinal" runat="server" Text="*" ForeColor="Red"></asp:Label><br>
                            <asp:TextBox ReadOnly="true" ID="txtDataFinal" runat="server" MaxLength="10"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <asp:Button ID="btnReservarParticular" runat="server" Text="Hóspede particular" Width="130px"
                    OnClick="btnReservarParticular_Click" /><br>
                <asp:Button ID="btnReservarFaturado" runat="server" Width="130px" Text="Hóspede faturado"
                    OnClick="btnReservarFaturado_Click" />
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
